﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Chapter.aspx.cs" Inherits="com.tiyma.web.book.Chapter" %>


<html>
<head runat="server">
    <title>阅读</title>
    <script>
    var bookId="<%=m_book_id %>";
    var preChapterId="<%=m_pre_chapter_id %>";
    var nextChapterId="<%=m_next_chapter_id %>";
    var siteId="<%=m_site_id %>";
    function pageEvent(b)
    {

        b=b||window.event;var a=b.which||b.keyCode;
        if(a==37)
        {
            goPre();
        }
        if(a==39)
        {
            goNext();
        }
    }
    document['onkeydown'] = pageEvent; 
    //小说目录
    function goBook()
    {
        window.location.href="/book/chapterList.aspx?bookId="+bookId+"&siteId="+siteId;
    }
    //上一章
    function goPre()
    {
       if(typeof(preChapterId)!="undefined" && preChapterId!=null)
       {
           if(preChapterId=="")
           {
              alert("已经是第一章节了!");
              return;
           }
           window.location.href="/book/chapter.aspx?bookId="+bookId+"&chapterId="+preChapterId+"&siteId="+siteId;
       }
    }
    //下一章
    function goNext()
    {
        if(typeof(nextChapterId)!="undefined" && nextChapterId!=null)
        {
           if(nextChapterId=="")
           {
              alert("已经是最后一个章节了!");
              return;
            
           }
           window.location.href="/book/chapter.aspx?bookId="+bookId+"&chapterId="+nextChapterId+"&siteId="+siteId;
           
        }
    }
    </script>
</head>

   <frameset rows="40,*" framespacing="0" frameborder="NO" border="0">
	<frame src="Header.aspx" scrolling="NO" noresize>
	<frame name="Main" src="<%=m_chapter_url %>" >
</frameset>
    

</html>
